﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DQYT.HTDZ.Model;

namespace DQYT.HTDZ.IDAL
{
    public interface IBDDepartment
    {
        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int BUM_ID);


        /// <summary>
        /// 增加一条数据
        /// </summary>
        bool Add(BDDepartmentModel model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(BDDepartmentModel model);

        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int BUM_ID);
        /// <summary>
        /// 批量删除数据
        /// </summary>
        bool DeleteList(string BUM_IDlist);


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        BDDepartmentModel GetModel(int BUM_ID);

        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetList(string strWhere);

        /// <summary>
        /// 获取记录总数
        /// </summary>
        int GetRecordCount(string strWhere);
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);

        #endregion  Method

        #region 新添加
        /// <summary>
        /// 获得部门人数
        /// </summary>
        /// <param name="BUM_ID">部门ID</param>
        /// <returns></returns>
        int GetRenShu(int BUM_ID);

        /// <summary>
        /// 获得最大上级ID
        /// </summary>
        /// <returns></returns>
        int GetMaxSJID();
        /// <summary>
        /// 获得下一个ID
        /// </summary>
        /// <returns></returns>
        int GetNextBUM_ID();
        /// <summary>
        /// 判断是否存在当前部门名称
        /// </summary>
        /// <param name="BUM_MC">部门名称</param>
        /// <returns></returns>
        bool CheckMC(string BUM_MC);
        #endregion
    }
}
